<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%String path = request.getContextPath();%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>保单结算明细 管理</title>
    <jsp:include page="../../import.jsp" flush="true"/>
</head>
<body class="iframeBody">
<form id="insPlcStlDtl_form">
    <div class="fieldset1 tabel_col tabel_col_1 clearFix">
        
<div class="fieldBox col_100">
	<div class="label">结算编号</div>
	<div class="field">
		<input name="stlId" id="stlId" type="text" class="ui-textbox" value="${insPlcStlDtlVO.stlId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保单ID</div>
	<div class="field">
		<input name="insPlcId" id="insPlcId" type="text" class="ui-textbox" value="${insPlcStlDtlVO.insPlcId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保单号</div>
	<div class="field">
		<input name="plcNo" id="plcNo" type="text" class="ui-textbox" value="${insPlcStlDtlVO.plcNo}" validate="{required:true,maxlength:30}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">购买方式INS0022</div>
	<div class="field">
		<select name="buyWayCd" id="buyWayCd" data-value="${insPlcStlDtlVO.buyWayCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${buyWayCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保单起始时间</div>
	<div class="field">
		<input name="insBgTm" id="insBgTm" type="text" class="ui-textbox" value="${insPlcStlDtlVO.insBgTm}" validate="{required:true,maxlength:0}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保单结束时间</div>
	<div class="field">
		<input name="insEndTm" id="insEndTm" type="text" class="ui-textbox" value="${insPlcStlDtlVO.insEndTm}" validate="{required:true,maxlength:0}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保费金额</div>
	<div class="field">
		<input name="insFee" id="insFee" type="text" class="ui-textbox" value="${insPlcStlDtlVO.insFee}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">返利金额</div>
	<div class="field">
		<input name="stlAmt" id="stlAmt" type="text" class="ui-textbox" value="${insPlcStlDtlVO.stlAmt}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">实际结算金额</div>
	<div class="field">
		<input name="actStlAmt" id="actStlAmt" type="text" class="ui-textbox" value="${insPlcStlDtlVO.actStlAmt}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">结算比例</div>
	<div class="field">
		<input name="stlRat" id="stlRat" type="text" class="ui-textbox" value="${insPlcStlDtlVO.stlRat}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保险公司编号</div>
	<div class="field">
		<input name="insCompId" id="insCompId" type="text" class="ui-textbox" value="${insPlcStlDtlVO.insCompId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保险公司名称</div>
	<div class="field">
		<input name="insCompNm" id="insCompNm" type="text" class="ui-textbox" value="${insPlcStlDtlVO.insCompNm}" validate="{required:true,maxlength:100}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保险支公司编号</div>
	<div class="field">
		<input name="insCompSubId" id="insCompSubId" type="text" class="ui-textbox" value="${insPlcStlDtlVO.insCompSubId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保险支公司名称</div>
	<div class="field">
		<input name="insCompSubNm" id="insCompSubNm" type="text" class="ui-textbox" value="${insPlcStlDtlVO.insCompSubNm}" validate="{required:true,maxlength:100}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">保险种类INS0007：1商业险2交强险3财产险4承运险</div>
	<div class="field">
		<select name="insTypCd" id="insTypCd" data-value="${insPlcStlDtlVO.insTypCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${insTypCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">客户ID</div>
	<div class="field">
		<input name="cstId" id="cstId" type="text" class="ui-textbox" value="${insPlcStlDtlVO.cstId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">客户名称</div>
	<div class="field">
		<input name="cstNm" id="cstNm" type="text" class="ui-textbox" value="${insPlcStlDtlVO.cstNm}" validate="{required:true,maxlength:50}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">所属客户经理</div>
	<div class="field">
		<input name="cstMgrId" id="cstMgrId" type="text" class="ui-textbox" value="${insPlcStlDtlVO.cstMgrId}" validate="{required:true,number:true}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">所属客户经理名称</div>
	<div class="field">
		<input name="cstMgrNm" id="cstMgrNm" type="text" class="ui-textbox" value="${insPlcStlDtlVO.cstMgrNm}" validate="{required:true,maxlength:30}">
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">客户经理组织架构代码</div>
	<div class="field">
		<select name="cstMgrOrgCd" id="cstMgrOrgCd" data-value="${insPlcStlDtlVO.cstMgrOrgCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${cstMgrOrgCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
<div class="fieldBox col_100">
	<div class="label">所属事业部（组织架构）</div>
	<div class="field">
		<select name="buOrgCd" id="buOrgCd" data-value="${insPlcStlDtlVO.buOrgCd}" validate="{required:true,select:true}">
	<option value=" ">请选择</option>
	<c:forEach items="${buOrgCdList}" var="item">
		<option value="${item.code }">${item.codeNm }</option>
	</c:forEach>
		</select>
		<span class="requiredSymbol">*</span>
	</div>
</div>
    </div>
    <div class="btnsBox">
        <span id="saveInsPlcStlDtl_Btn" class="sq-button sq-button-hasicon l-dialog-btn-ok">
        <i class="sqBtnIco_10"></i>保存</span>
        <input type="reset" id="resetBtn" class="l-button l-button-reset Hide">
    </div>
</form>
<script>
    $(function() {
        var insPlcStlDtlId = "${insPlcStlDtlVO.id}";//主键ID
        $("#insPlcStlDtl_form").ligerForm({
            validate: true
        });
        /*保存*/
        $("#saveInsPlcStlDtl_Btn").click(function (event) {
            var form = liger.get("insPlcStlDtl_form");
            if (!form.valid()) {
                $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_MUST_FIX_ITEM_INFO, SQ_type: "warning"});
                return false; //验证不通过，不执行以下代码
            }
            var data = form.getData();
            $.ligerDialog.hide();
            var _url;
            if (insPlcStlDtlId == '') {//新增
                _url = '<%=path%>/insurance/insPlcStlDtl/add.do';
            } else {//修改
                _url = '<%=path%>/insurance/insPlcStlDtl/modify.do?id=' + insPlcStlDtlId;
            }
            var wait_dialog;
            $.ajax({
                type: 'post',
                dataType: 'json',
                data: data,
                url: _url,
                beforeSend: function () {
                    wait_dialog = $.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
                },
                success: function (msg) {
                    wait_dialog.close();
                    if (msg.success == 1) {
                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
                        parent.$("#clearBtn").click();
                        parent.$("#searchBtn").click();
                        frameElement.dialog.close();
                        
                        //$("#resetBtn").click();
                        //回调刷新列表
                        //var callback=frameElement.W2W.callback;
                        //Remove_navTab();
                        //callback();
                    } else {
                        $.ligerDialog.SQalert({content: msg.info, SQ_type: "error"});
                    }
                }
            });
        });
    });
</script>
</body>
</html>
